﻿@{
    ViewBag.Title = "HỆ THỐNG QUẢN LÝ MẠNG VIỄN THÔNG";
    Layout = "~/Views/Shared/_Layout.cshtml";
}


<div id="tabsMainPage" style="width:100%;">

    <div title="Tổng quan" id="Tabs_Index_Tongquang" style="width:100%; position:relative">

        <div style="position:absolute; right:20px; top:10px; z-index: 99;">

            <input value="@ViewBag.coutIteDauNoi" id="Id_ViewBag_coutIteDauNoi" hidden="hidden" />

            <input value="@ViewBag.DauNoiFirst" id="combobox_daunoi_thiet_on_home" style="width:300px; height:27px" />

        </div>

        <div id="LoadGianDoGPOn_HomeIndex" style="width:100%; position:relative; padding-top:50px">

            <div id="ContentGianDo_HomeIndex">



            </div>

        </div>


    </div>
</div>

<script type="text/javascript">

    $(document).ready(function () {


        $("#Tabs_Index_Tongquang").height($(window).height() - 100);
        $("#LoadGianDoGPOn_HomeIndex").height($(window).height() - 150);

        $("#LoadGianDoGPOn_HomeIndex").mask("Giản đồ đang được tải dữ liệu");

        $("#combobox_daunoi_thiet_on_home").combotree({
            url: _nameSubDomain + "/ONTGpon/listJsonIntoCateTree_Home?toql=&donviql=",
            idField: "id",
            treeField: "vntpSite",
            onSelect: function (row) {

                $("#LoadGianDoGPOn_HomeIndex").mask("Giản đồ đang được tải dữ liệu");

                setTimeout(function () {

                    $.ajax({ url: _nameSubDomain + "/Home/LoadViewGianDoGpon_Home?DauNoid=" + row.ThietbiId, async: false }).done(function (data) {


                        $("#ContentGianDo_HomeIndex").html("");

                        $("#ContentGianDo_HomeIndex").html(data);

                    });


                }, 3000);

                setTimeout(function () {

                    $("#LoadGianDoGPOn_HomeIndex").unmask();

                }, 5000);

            },
            onLoadSuccess: function (row) {
            }
        });

        setTimeout(function () {

            if($("#Id_ViewBag_coutIteDauNoi").val() > 0)
            {

                $.ajax({ url: _nameSubDomain + "/Home/LoadViewGianDoGpon_Home?DauNoid=@ViewBag.DauNoiFirst", async: false }).done(function (data) {


                    $("#ContentGianDo_HomeIndex").html("");

                    $("#ContentGianDo_HomeIndex").html(data);

                });
            }

            $("#LoadGianDoGPOn_HomeIndex").unmask();

        }, 300);

    });

</script>

<script src="~/Scripts/_vnptSite_JS.js"></script>
<script src="~/Scripts/CapQuangJs.js"></script>
<script src="~/Scripts/export_canvas/base64.js"></script>
<script src="~/Scripts/htmlCavas/html2canvas.min.js"></script>
<style>

    path.link {
      fill: none;
      stroke: #f20000;
      stroke-width: 3px;
    }

    .node circle {
      cursor: pointer;
      fill: #fff;
      stroke: steelblue;
      stroke-width: 1.5px;
    }

    .node text {
      font-size: 11px;
      font-family: Arial;
    }

</style>